<?php
/**
 * P�gina principal do sistema, cont�m todos os menus da aplica��o.
*/

//ob_start();

if( !function_exists('__autoload') )
{
    function __autoload($class_name) {
    require_once $class_name . '.php';
    }
}

SAEO::ValidarAcesso( array() );

$s = new Servidor();
$servidorLogado = $s->CarregarServidor( $_SESSION['servidorId'] );

?>

<html>
<head>
<title>SAEO - Sistema de Acompanhamento de Execu&ccedil;&atilde;o Or&ccedil;ament&aacute;ria - IFAL</title>
<link rel='stylesheet' href='templates/estilos.css'>
<script type='text/javascript' src='templates/jquery/js/jquery-1.4.2.min.js'></script>
<script type='text/javascript' src='templates/jquery.jqDock.js'></script>  

    
<style type="text/css">
	
	#teste {position:absolute; top:0; left:0; width:100%; display:none;}
	/*dock styling...*/
	/*...centre the dock...*/
	#teste div.jqDockWrap {margin:0 auto;}
	/*...set the cursor...*/
	#teste div.jqDock {cursor:pointer;}
	/*label styling...*/
	div.jqDockLabel {font-weight:bold; font-style:italic; white-space:nowrap; color:#000000; cursor:pointer;}
</style>  
    
    <script type='text/javascript' >
    jQuery(document).ready(function($){
    	  // set up the options to be used for jqDock...
    	  var dockOptions =
    	    { align: 'bottom' // horizontal menu, with expansion DOWN from a fixed TOP edge    	   
    	    , labels: 'br'  // add labels (defaults to 'br')
        	, size: "60px"
    	    
    	    
    	    };
    	  // ...and apply...
    	  $('#opc').jqDock(dockOptions);
    	});    
    </script>    
    
</head>
<body class='body'>
	<table width='779' border='0' cellspacing='0' cellpadding='0' align='center'>
		<tr>
    		<td height='30'>	     <table width='779' border='0' cellspacing='0' cellpadding='0' align='center'>
		     <tr>
		         <td height='112' background='templates/banner.JPG'>
		         	<div id='menu2'>
			         | <a class='link' href='Acesso.php'>P&aacute;gina Principal</a>
		             | <a class='link' href='Logout.php'>Logoff</a> |
			         <br><br><br><br><span class='login'>Servidor: <?php echo $servidorLogado->usuario; ?></span>
		             </div>
		             <div id='login' style=''>
		             </div>
		        </td>
		     </tr>
		</table></td>
  		</tr>
		<tr>
			<td bgcolor='#FFFFFF' align="center"><div class='titulosTabelas' style='width:779; height:20; background:url(templates/tabela.jpg)'>ESCOLHA O M&Oacute;DULO:</div></td>
		</tr>
		
  		<tr>
    		<td bgcolor='#FFFFFF' height="300">
			<div id='page' align="center" style="background-color:#c1d39f;" >
  				<div id='opc' >
  					<a href="Acesso.php?modulo=orc" >   					
  					<img src="templates/btn_orcamento.png" title="Or&ccedil;amento" alt=""/>
  					</a>
  					&nbsp;&nbsp;&nbsp;
  					<a href="Acesso.php?modulo=com">
  					<img  src="templates/btn_compras.png" title="Compras " alt="" />
  					</a>
  					<?php
  						if(isset($_GET['modulo']))
  							if($_GET['modulo']== 'orc'){
  								$_SESSION['modulo'] = 'orc';
  								header("Location: PaginaPrincipalOrcamento.php");
  							} else
  							{
  								$_SESSION['modulo'] = 'com';
  								header("Location: PaginaPrincipal.php");
  							}
  					
  					?>
  				</div>
			</div>  
			</td>
		</tr>
		<tfoot>
        	<tr><?php include 'rodapeCreditos.php'; ?></tr>
        </tfoot>
	</table>
</body>
</html>